import * as React from 'react';
class Jxs extends React.Component{
    
     render() {
        return (
            <div className="c-react-home-wrap react-loop-arr">
                <h2 onClick={()=>{
                    window.location.href='http://10.15.198.18:8090/pages/viewpage.action?pageId=3932983#id-%E3%80%90%E5%88%86%E4%BA%AB%E4%BC%9A1811%E3%80%9109-react%E8%84%9A%E6%89%8B%E6%9E%B6---create-reate-app-7.1%E3%80%81%E6%95%B0%E7%BB%84%E6%B8%B2%E6%9F%93'
                }}>react请求接口</h2>
                <p>前后端主要是通过调用API接口实现通信的，那么前端一般是如何调用接口的呢？</p>
                <ul>
                    <li>
                        <h4 className="list-title">react接口运用了es7的async,await</h4>
                        <p>axios封装</p>
                        <img src={require('$img/react/react-axios.png')} alt=""/>
                        
                        <p>调用接口，运用es7语法async,await</p>
                        <img src={require('$img/react/react-api.png')} alt=""/>
                        <p>接口定义</p>
                        <img src={require('$img/react/react-api-import.png')} alt=""/>
                    </li>
                </ul>
            </div>
        );
    }
}

export default Jxs;
